SG Window | IsgPaintSink |
ClientPaint Method |
IsgPaintSink Constants Error Codes |
Called when client area of the window should be painted.
Private Sub IsgPaintSink_ClientPaint(ByVal hdc As Long, ByVal left As Long, ByVal top As Long, ByVal right As Long, ByVal bottom As Long)
Part | Description |
hdc | Handle of the client area device context. Used as a parameter for all drawing functions. |
left, top, right, bottom | Coordinates of the smallest rectangle that completely encloses window's update region expressed in pixels relative to the window client area rectangle. |
When you implement IsgPaintSink interface this method must contain code responsible for client-area painting.
Following example draws rectangle over window client area:
Private mWnd As SGWindow.Window Private Sub IsgPaintSink_ClientPaint(ByVal hdc As Long, ByVal left As Long, _ ByVal top As Long, ByVal right As Long, ByVal bottom As Long) ' Draw rectangle over whole client area Dim rc As RECT GetClientRect mWnd.HWND, rc Rectangle hdc, 0, 0, rc.right, rc.bottom End Sub